<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ page import="java.util.*,
                 com.kylin.common.util.*,
                 com.kylin.hibernate.*,
                 com.kylin.module.ad.orm.*" %>
<%@ include file="/common/include/taglibs.jsp"%>
	编辑广告

<br><mytag:MyActionMsg /> 
<%
    if(request.getAttribute(Constants.KEY_REQUEST_RESULT) instanceof AD){
        AD obj = (AD)request.getAttribute(Constants.KEY_REQUEST_RESULT);
%>
<html:form action="/admin/ad/manageAD.do" method="post" enctype="multipart/form-data">
<input type="hidden" name="CMD" value="updateAD">
<input type="hidden" name="id" value="<%=obj.getId() %>">
<table width="400"  cellspacing="0" cellpadding="0">
    <tr><td align="left" width="100">广告类型</td>
        <td>
		<%=obj.getAdtype().getName() %>(<%=obj.getAdtype().getMark() %>)
		</td>
    </tr>
    <tr><td align="left" width="100">广告名称</td>
        <td><input type="text" name="name" value="<%=obj.getName() %>"/></td>
    </tr>
    <tr><td align="left" >广告所属人</td>
        <td><input type="text" name="owner" value="<%=obj.getOwner() %>" /></td>
    </tr>
    <tr><td align="left" >投放语言版本</td>
        <td><mytag:national name="language" notEmpty="true"
				dictName="<%=Constants.SYSLANGUAGE%>" value="<%=obj.getLanguage() %>"/>
		</td>
    </tr>
    <tr><td align="left" >链接</td>
         <td><input type="text" name="link" value="<%=obj.getLink() %>" /></td>
    </tr>
    <tr><td align="left" >到期时间</td>
         <td>
         <%
         java.text.SimpleDateFormat dateformat = new java.text.SimpleDateFormat("yyyy-MM-dd");
          String endTime = "";
          if(obj.getEndtime()!=null)
            endTime = dateformat.format(obj.getEndtime());
         %>
			<mytag:CalendarInput name="endtime" id="endtimeId" 
				imgId="endtime_img" size="10" value="<%=endTime %>"/>
				
         </td>
    </tr>
    <tr><td align="left" >说明文字</td>
        <td><input type="text" name="memo" value="<%=obj.getMemo() %>" /></td>
    </tr>
    <tr><td align="left">排序号  &nbsp;</td>
      <td ><input type="text" name="ordering" value="<%=obj.getOrdering() %>"></td>
    </tr>
    <tr><td align="left">上传媒体文件  &nbsp;</td>
      <td ><img src="/AD/<%=obj.getAdtype().getMark() %>/<%=obj.getFileurl() %>" 
      width="50" height="50"><input type="file" name="file" value="100"></td>
    </tr>
    <tr><td colspan=2 align=center><input type="submit" value="保存"></td></tr>
</table>    
</html:form>
<%
    }
%>

